<?php
/**
 * Created by PhpStorm.
 * Date: 2016/7/21
 * Time: 12:23
 */

class RwRecord{
    public $rwid;
    public $rwName;
    public $startStationId;
    public $startStation;
    public $endStationId;
    public $endStation;
    public $startTime;
    public $endTime;
    public $reverseStartTime;
    public $reverseEndTime;
    public $stationInfos = array('T'=>'StationInfo');

    function init($row){
//        echo "rwid=".$row['rwid'];
        $this->rwid = $row['rwid'];
        $this->rwName = $row['rwName'];
        $this->startStationId = $row['startStationId'];
        $this->startStation = $row['startStation'];
        $this->endStationId = $row['endStationId'];
        $this->endStation = $row['endStation'];
        $this->startTime = $row['startTime'];
        $this->endTime = $row['endTime'];
        $this->reverseStartTime = $row['reverseStartTime'];
        $this->reverseEndTime = $row['reverseEndTime'];
    }
}

class StationInfo{
    public $stationId;
    public $stationName;
    public $changeLines;
    public $exportNum;
    public $toiletNum;
    public $busInfos = array('T'=>'BusInfo');

    function init($row){
        $this->stationId = $row['stationId'];
        $this->stationName = $row['stationName'];
        $this->changeLines = $row['changeLines'];
        $this->exportNum = $row['exportNum'];
        $this->toiletNum = $row['toiletNum'];
    }
}

class BusInfo{
    public $busId;
    public $busName;
    public $busStartStation;
    public $busEndStation;
    public $busStartTime;
    public $busEndTime;
    public $busStations = array('T'=>'array');

    function init($row){
        $this->busId = $row['busId'];
        $this->busName = $row['busName'];
        $this->busStartStation = $row['busStartStation'];
        $this->busEndStation = $row['busEndStation'];
        $this->busStartTime = $row['busStartTime'];
        $this->busEndTime = $row['busEndTime'];
    }
}